package com.ebraga.trackerclub.android.handler.service;

import com.ebraga.trackerclub.android.exception.handler.BackofficeHandlerException;
import com.ebraga.trackerclub.android.exception.manager.BackofficeManagerException;
import com.ebraga.trackerclub.android.handler.core.SyncDataHandlerImpl;
import com.ebraga.trackerclub.android.manager.api.SyncDataManager;
import com.ebraga.trackerclub.android.manager.service.SyncDataServiceManager;
import com.ebraga.trackerclub.android.util.api.AndroidContext;

public class SyncDataServiceHandler extends SyncDataHandlerImpl {

	public SyncDataServiceHandler(AndroidContext context) throws BackofficeHandlerException {
		try {
			String enviroment = System.getProperty("Enviroment");
			if(!"UNIT_TEST".equals(enviroment)) {
				setSyncDataManager(new SyncDataServiceManager(context));
			}
		} catch (BackofficeManagerException e) {
			throw new BackofficeHandlerException(e);
		}
	}
	
	@Override
	public void setSyncDataManager(SyncDataManager syncDataManager) {
		super.setSyncDataManager(syncDataManager);
	}
}
